package edu.ahut.corejava2.oop.v1;

public class Pillar {
    double height;
    Circle base;


    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public Circle getBase() {
        return base;
    }

    public void setBase(Circle base) {
        this.base = base;
    }

    double getVolume() {
        return base.getArea() * height;
    }

    public Pillar(double height, Circle base) {
        this.height = height;
        this.base = base;
    }

    public Pillar() {
        this(10, new Circle(5));
    }
}
